home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD008b.dsk
/
HELLO.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
6KB
|
140 lines
2 ID$ = "SOFTDISK JUNE 82 HARVEST"
3 PN$ = "HELLO"
5 REM *************************** ** FLEXIBLE MENU PROGRAM ** BY DALE SALYER ** JULY 25, 1981 ** *****************************
7 REM *************************** ** NESTED MENU FEATURE ** ADDED BY DANIEL TOBIAS ** FEBRUARY 6, 1982 ** *****************************
10 D$ = CHR$(13) + CHR$(4):Q$ = CHR$(34):Q1$ = Q$ +"," +Q$
20 DIM DESC$(20,20),CMD$(20,20),FILE$(20,20)
30 DIM NP(20)
40 READ NM: FOR A = 0 TO NM
50 READ NP(A): FOR B = 0 TO NP(A)
60 READ DESC$(A,B),CMD$(A,B),FILE$(A,B)
70 NEXT B,A
80 M = 0
90 GOTO 300
150 K = PEEK( -16384)
160 IF K <128 THEN 150
170 POKE -16368,0:C = K -192
180 IF K = 141 THEN TEXT : HOME : PRINT D$;"CATALOG": END
190 IF K = 160 THEN GOSUB 250: GOTO 150
195 IF K = 187 AND CM$(M,0) < >"" THEN F$ = CM$(M,0): POP : GOTO 900
200 IF K = 155 THEN TEXT : HOME : END
210 IF K = 175 THEN 500
220 IF C <1 OR C >NP(M) THEN 150
222 IF VAL(CMD$(M,C)) >0 OR CMD$(M,C) = "0" THEN POP :F$ = CMD$(M,C): GOTO 900
225 VTAB 19: PRINT CMD$(M,C);FILE$(M,C)
227 TEXT : HOME
230 PRINT D$;CMD$(M,C);FILE$(M,C)
240 END
245 REM ************************* ** PRINT NEXT PAGE OF ** PROGRAMS. ** *****************************
250 HOME : FOR I = OL TO OL +4:VT = (I -OL +1) *2 +6
260 HTAB 3: VTAB VT: PRINT CHR$(64 +I);: HTAB 10: PRINT DESC$(M,I)
270 IF I > = NP(M) THEN OL = 1: RETURN
280 NEXT I
290 OL = OL +5: RETURN
300 REM ************************* ** PROGRAM START ** *****************************
310 TEXT : HOME : INVERSE : PRINT "**** FLEXIBLE MENU : BY DALE SALYER ****NESTED MENU FEATURE ADDED BY DAN TOBIAS ";
320 NORMAL : PRINT "----------------------------------------";ID$;: IF LEN(ID$) <40 THEN PRINT
330 PRINT "----------------------------------------"
332 HTAB 10: VTAB 6: PRINT DESC$(M,0)
335 POKE 34,6
337 INVERSE
340 VTAB 23: HTAB 11: PRINT "<RETURN> CATALOG "
350 VTAB 22: HTAB 11: PRINT "<SPACE> NEXT PAGE "
360 VTAB 21: HTAB 11: PRINT "<ESC>APE TO BASIC "
370 VTAB 20: HTAB 11: PRINT " / ENTER PROG. DATA"
372 P = 19
375 IF CM$(M,0) < >"" THEN VTAB 19: HTAB 11: PRINT " ; PREVIOUS MENU ":P = 18
380 VTAB P: HTAB 11: PRINT "A - "; CHR$(64 +NP(M));" SELECT PROG. "
390 NORMAL : POKE 35,17: REM BOTTOM
400 OL = 1
420 GOSUB 250
430 GOSUB 150
440 END
500 REM ************************* ** ENTER NEW DATA ** *****************************
502 TEXT : HOME : PRINT "(HIT RETURN IF UNCHANGED)": PRINT "ENTER DISK I.D. LINE:": INPUT "";I$: IF I$ < >"" THEN ID$ = I$
503 PRINT : INPUT "NAME TO SAVE THIS PROGRAM UNDER: ";P$: IF P$ < >"" THEN PN$ = P$
505 M = 0:NM = 0
507 FILE$(0,0) = "":CMD$(0,0) = "":DESC$(0,0) = ""
510 TEXT : HOME : HTAB 10: PRINT "DATA STATEMENT ENTRY": POKE 34,3: FOR I = 1 TO 20: HOME
515 PRINT "ENTERING MENU #"M" "DESC$(M,0)
520 VTAB 5: PRINT "NAME OF PROGRAM <QUIT = DONE,": PRINT "RETURN = MENU, CAT = CATALOG>": INPUT FILE$(M,I)
524 IF FILE$(M,I) = "QUIT" THEN 600
526 IF FILE$(M,I) = "CAT" THEN PRINT D$;"CATALOG": PRINT : PRINT "PRESS RETURN TO CONTINUE": GET R$: HOME : GOTO 520
528 IF FILE$(M,I) = "" THEN PRINT "THIS WILL BE MENU #";NM +1:NM = NM +1:CMD$(M,I) = STR$(NM):CMD$(NM,0) = STR$(M):FILE$(NM,0) = "":DESC$(NM,0) = "": GOTO 580
530 VTAB 10: PRINT "TYPE OF FILE - <E>XEC, <B>RUN, <R>UN";: INPUT C$
535 C$ = LEFT$(C$,1)
540 IF C$ = "E" THEN CMD$(M,I) = "EXEC ": PRINT : PRINT " EXEC": GOTO 580
550 IF C$ = "B" THEN CMD$(M,I) = "BRUN ": PRINT : PRINT " BRUN": GOTO 580
560 IF C$ = "R" THEN CMD$(M,I) = "RUN ": PRINT : PRINT " RUN": GOTO 580
570 GOTO 530
580 VTAB 15: PRINT "DESCRIPTION (25 CHAR. MAX.) :"
590 VTAB 17: HTAB 1: PRINT "_________________________!": VTAB 17: HTAB 1
595 INPUT DESC$(M,I): IF FILE$(M,I) = "" THEN DESC$(NM,0) = DESC$(M,I)
597 NEXT I
600 NP(M) = I -1
605 IF M <NM THEN M = M +1: GOTO 510
610 PRINT D$;"OPEN EXECFILE": PRINT D$;"DELETE EXECFILE": PRINT D$;"OPEN EXECFILE": PRINT D$;"WRITE EXECFILE"
613 PRINT "2 ID$=";Q$;ID$;Q$: PRINT "3 PN$=";Q$;PN$;Q$
620 PRINT "DEL 1000,2000": PRINT "1000 DATA ";NM
625 LN = 1010
630 FOR I = 0 TO NM: PRINT LN;" DATA "NP(I):LN = LN +10: FOR J = 0 TO NP(I)
640 PRINT LN;" DATA ";Q$;DESC$(I,J);Q1$;CMD$(I,J);Q1$;FILE$(I,J);Q$
645 LN = LN +10
650 NEXT J,I
670 PRINT "UNLOCK ";PN$
680 PRINT "SAVE ";PN$
690 PRINT "LOCK ";PN$
700 PRINT "RUN ";PN$
710 PRINT D$"CLOSE EXECFILE"
720 PRINT D$;"EXEC EXECFILE"
730 TEXT
740 VTAB 20: END
900 REM GOTO MENU
910 M = VAL(F$)
920 GOTO 300
1000 DATA 8
1010 DATA 8
1020 DATA "","",""
1030 DATA "GAMES","1",""
1040 DATA "NOVELTIES","2",""
1050 DATA "UTILITIES","3",""
1060 DATA "HOME & BUSINESS","4",""
1070 DATA "TUTORIALS","5",""
1080 DATA "IQ STUFF","6",""
1090 DATA "EDUCATIONAL","7",""
1100 DATA "SORTS","8",""
1110 DATA 4
1120 DATA "GAMES","0",""
1130 DATA "EVASION","RUN ","EVASION"
1140 DATA "STARS","RUN ","STARS"
1150 DATA "SPACE.GORN","RUN ","SPACE.GORN"
1160 DATA "HORSE.RACE","RUN ","HORSE.RACE"
1170 DATA 3
1180 DATA "NOVELTIES","0",""
1190 DATA "RANDOM.WALK","RUN ","RANDOM.WALK"
1200 DATA "SMILEY.FACE","RUN ","SMILEY.FACE"
1210 DATA "SIREN","RUN ","SIREN"
1220 DATA 3
1230 DATA "UTILITIES","0",""
1240 DATA "HEX.TO.TEN","RUN ","HEX.TO.TEN"
1250 DATA "EXECUMATIC","EXEC ","STARTOFF"
1260 DATA "DRAW.SHAPES","RUN ","DRAW.SHAPES"
1270 DATA 2
1280 DATA "HOME & BUSINESS","0",""
1290 DATA "JURY","RUN ","JURY"
1300 DATA "STOPWATCH","RUN ","STOPWATCH"
1310 DATA 2
1320 DATA "TUTORIALS","0",""
1330 DATA "WHAT I DO","RUN ","WHAT I DO PART1"
1340 DATA "MATRIX.MAGIC","RUN ","MATRIX.MAGIC"
1350 DATA 1
1360 DATA "IQ STUFF","0",""
1370 DATA "VOCAB","RUN ","VOCAB"
1380 DATA 2
1390 DATA "EDUCATIONAL","0",""
1400 DATA "PERIODIC ELEMENT TABLE","RUN ","THE.TABLE"
1410 DATA "ION.TEST","RUN ","ION.TEST"
1420 DATA 2
1430 DATA "SORTS","0",""
1440 DATA "SORT.ROUTINE","RUN ","SORT.ROUTINE"
1450 DATA "BUBBLE.SORT","RUN ","BUBBLE.SORT"